{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]'"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import sys \n",
    "sys.version"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests,json\n",
    "import datetime\n",
    "import decimal\n",
    "import logging"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ja_db(dc ,act='get',host=None):\n",
    "    \"\"\" http读写数据库 \n",
    "    \"\"\"\n",
    "    if host is None:\n",
    "        host='7erpio.17121.top:2028'\n",
    "    tpl = \"http://{}/jsonapi/{}\"\n",
    "    url=tpl.format(host,act)\n",
    "    data = json.dumps(dc,   default=datetime.datetime.isoformat)\n",
    "    #--获取账号信息\n",
    "    res_obj = requests.post(url ,data=data,timeout=25)#不能发送中文\n",
    "    if res_obj.status_code != 200:\n",
    "        logger.warning('访问 %s 服务错误 【%s】  / %s'%(url, res_obj.status_code, res_obj.text))\n",
    "    #print(res_obj.text )\n",
    "    dat_dc = json.loads(res_obj.text)\n",
    "    return dat_dc \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-05-17 15:32:18,297 - INFO - 启动或载入\n"
     ]
    }
   ],
   "source": [
    "def mylog(name='mylog'):\n",
    "    # 创建一个Logger对象\n",
    "    logger = logging.getLogger(name)\n",
    "    logger.setLevel(logging.INFO)\n",
    "    if not logger.handlers:\n",
    "        # 创建一个文件处理器\n",
    "        file_handler = logging.FileHandler('xl.log',encoding=\"utf-8\")\n",
    "        console_handler = logging.StreamHandler()\n",
    "        # 创建一个日志格式化器\n",
    "        formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')\n",
    "        file_handler.setFormatter(formatter)\n",
    "        console_handler.setFormatter(formatter)\n",
    "        # 将文件处理器添加到Logger中\n",
    "        logger.addHandler(file_handler)\n",
    "        logger.addHandler(console_handler)\n",
    "    return logger\n",
    "logger = mylog()\n",
    "\n",
    "logger.info('启动或载入')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re,json\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xlwings as xw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "app=xw.App(visible=True,add_book=False)\n",
    "filepath=r'D:\\好大一张脸\\桌面\\生产订单_业务状态.xlsx'\n",
    "wb=app.books.open(filepath)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [],
   "source": [
    "sheet = wb.sheets['Sheet1']\n",
    "rowNum = sheet.used_range.last_cell.row\n",
    "rankNum = sheet.used_range.last_cell.column\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['单据编号',\n",
       " '业务状态',\n",
       " '领料状态',\n",
       " '单据状态',\n",
       " '型号',\n",
       " '销售订单号',\n",
       " '旧物料编码',\n",
       " '销售订单号（隐藏）',\n",
       " '规格',\n",
       " '需求单据',\n",
       " None,\n",
       " datetime.datetime(2024, 5, 13, 0, 0)]"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sheet.range((1,1),(1,rankNum)).value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [],
   "source": [
    "data  =  sheet.range('A3').options( expand='table') .value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>单据编号</th>\n",
       "      <th>业务状态</th>\n",
       "      <th>领料状态</th>\n",
       "      <th>单据状态</th>\n",
       "      <th>型号</th>\n",
       "      <th>销售订单号</th>\n",
       "      <th>旧物料编码</th>\n",
       "      <th>销售订单号（隐藏）</th>\n",
       "      <th>规格</th>\n",
       "      <th>需求单据</th>\n",
       "      <th>NaN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6007</th>\n",
       "      <td>MO014693</td>\n",
       "      <td>下达</td>\n",
       "      <td>未领料</td>\n",
       "      <td>已审核</td>\n",
       "      <td>601</td>\n",
       "      <td>None</td>\n",
       "      <td>2.PQ.P004.0138</td>\n",
       "      <td>None</td>\n",
       "      <td>气箱透明红色186;底板透明本色</td>\n",
       "      <td>2401-061</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          单据编号 业务状态 领料状态 单据状态   型号 销售订单号           旧物料编码 销售订单号（隐藏）  \\\n",
       "6007  MO014693   下达  未领料  已审核  601  None  2.PQ.P004.0138      None   \n",
       "\n",
       "                    规格      需求单据   NaN  \n",
       "6007  气箱透明红色186;底板透明本色  2401-061  None  "
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['单据编号']=='MO014693']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "vv = ja_db({\n",
    "'erp/T_PRD_MO@生产订单':{\n",
    "        #\"FBILLNO\":FBILLNO,\n",
    "         \"@column\": 'FDATE,FID,FBILLNO' ,\n",
    "        #\"@limit\":1\n",
    "    }, \n",
    "    \"erp/T_PRD_MOENTRY_Q\":{\n",
    "        \"@column\":  \"FID,FFORCECLOSERID.结案人id,FCLOSETYPE.结案类型,FPICKMTLQTY.领料套数,FPICKMTRLSTATUS.领料状态\" ,\n",
    "         'FID|': 'erp/T_PRD_MO@生产订单.FID',\n",
    "    }\n",
    "   \n",
    "   \n",
    "}) #//生产订单"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FDATE</th>\n",
       "      <th>FID</th>\n",
       "      <th>FBILLNO</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106704</td>\n",
       "      <td>515-20210410030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106705</td>\n",
       "      <td>515-20210410031</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 FDATE     FID          FBILLNO\n",
       "0  2023-06-02 00:00:00  106704  515-20210410030\n",
       "1  2023-06-02 00:00:00  106705  515-20210410031"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df生产订单 = pd.DataFrame(vv['erp/T_PRD_MO@生产订单']) \n",
    "df生产订单.head(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FID</th>\n",
       "      <th>结案人id</th>\n",
       "      <th>结案类型</th>\n",
       "      <th>领料套数</th>\n",
       "      <th>领料状态</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>106704</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>106705</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      FID  结案人id 结案类型  领料套数 领料状态\n",
       "0  106704      0        0.0    1\n",
       "1  106705      0        0.0    1"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df生产细附加 = pd.DataFrame(vv['erp/T_PRD_MOENTRY_Q']) \n",
    "df生产细附加.head(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "unexpected EOF while parsing (<ipython-input-50-e60ca5183310>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-50-e60ca5183310>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    pd.merge( left, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy\u001b[0m\n\u001b[1;37m                                                                                                                                                          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m unexpected EOF while parsing\n"
     ]
    }
   ],
   "source": [
    "#pd.merge( left, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FDATE</th>\n",
       "      <th>FID</th>\n",
       "      <th>FBILLNO</th>\n",
       "      <th>结案人id</th>\n",
       "      <th>结案类型</th>\n",
       "      <th>领料套数</th>\n",
       "      <th>领料状态</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106704</td>\n",
       "      <td>515-20210410030</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106705</td>\n",
       "      <td>515-20210410031</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106706</td>\n",
       "      <td>515-20210410032</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106707</td>\n",
       "      <td>515-20210410033</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-06-02 00:00:00</td>\n",
       "      <td>106708</td>\n",
       "      <td>515-20220214001</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 FDATE     FID          FBILLNO  结案人id 结案类型  领料套数 领料状态\n",
       "0  2023-06-02 00:00:00  106704  515-20210410030      0        0.0    1\n",
       "1  2023-06-02 00:00:00  106705  515-20210410031      0        0.0    1\n",
       "2  2023-06-02 00:00:00  106706  515-20210410032      0        0.0    1\n",
       "3  2023-06-02 00:00:00  106707  515-20210410033      0        0.0    1\n",
       "4  2023-06-02 00:00:00  106708  515-20220214001      0        0.0    1"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df业务状态 = pd.merge(df生产订单,df生产细附加,how=\"left\",on=\"FID\")\n",
    "df业务状态.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "df业务状态2  = pd.merge(df.loc[:,['单据编号','领料状态']],df业务状态,how=\"left\",left_on=\"单据编号\",right_on='FBILLNO')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>单据编号</th>\n",
       "      <th>FDATE</th>\n",
       "      <th>FID</th>\n",
       "      <th>FBILLNO</th>\n",
       "      <th>结案人id</th>\n",
       "      <th>结案类型</th>\n",
       "      <th>领料套数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>领料状态_x</th>\n",
       "      <th>领料状态_y</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">全部领料</th>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "      <td>10209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">未领料</th>\n",
       "      <th>1</th>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "      <td>1705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">超额领料</th>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "      <td>5823</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">部分领料</th>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "      <td>4466</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                单据编号  FDATE    FID  FBILLNO  结案人id   结案类型   领料套数\n",
       "领料状态_x 领料状态_y                                                   \n",
       "全部领料   1           2      2      2        2      2      2      2\n",
       "       2           1      1      1        1      1      1      1\n",
       "       3       10209  10209  10209    10209  10209  10209  10209\n",
       "       4           7      7      7        7      7      7      7\n",
       "未领料    1        1705   1705   1705     1705   1705   1705   1705\n",
       "       2          20     20     20       20     20     20     20\n",
       "       3           4      4      4        4      4      4      4\n",
       "       4          14     14     14       14     14     14     14\n",
       "超额领料   1           1      1      1        1      1      1      1\n",
       "       2           3      3      3        3      3      3      3\n",
       "       3          20     20     20       20     20     20     20\n",
       "       4        5823   5823   5823     5823   5823   5823   5823\n",
       "部分领料   1           1      1      1        1      1      1      1\n",
       "       2        4466   4466   4466     4466   4466   4466   4466\n",
       "       3           9      9      9        9      9      9      9\n",
       "       4           4      4      4        4      4      4      4"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df业务状态2.groupby(['领料状态_x','领料状态_y',]).count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>单据编号</th>\n",
       "      <th>领料状态_x</th>\n",
       "      <th>FDATE</th>\n",
       "      <th>FID</th>\n",
       "      <th>FBILLNO</th>\n",
       "      <th>结案人id</th>\n",
       "      <th>结案类型</th>\n",
       "      <th>领料套数</th>\n",
       "      <th>领料状态_y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>859</th>\n",
       "      <td>MO019814</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2024-04-27 00:00:00</td>\n",
       "      <td>129416.0</td>\n",
       "      <td>MO019814</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>990.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9604</th>\n",
       "      <td>MO011097</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-28 00:00:00</td>\n",
       "      <td>120699.0</td>\n",
       "      <td>MO011097</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>100000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10262</th>\n",
       "      <td>MO010464</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-20 00:00:00</td>\n",
       "      <td>120066.0</td>\n",
       "      <td>MO010464</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10263</th>\n",
       "      <td>MO010464</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-20 00:00:00</td>\n",
       "      <td>120066.0</td>\n",
       "      <td>MO010464</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10264</th>\n",
       "      <td>MO010464</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-20 00:00:00</td>\n",
       "      <td>120066.0</td>\n",
       "      <td>MO010464</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10265</th>\n",
       "      <td>MO010464</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-20 00:00:00</td>\n",
       "      <td>120066.0</td>\n",
       "      <td>MO010464</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10266</th>\n",
       "      <td>MO010464</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-20 00:00:00</td>\n",
       "      <td>120066.0</td>\n",
       "      <td>MO010464</td>\n",
       "      <td>120836.0</td>\n",
       "      <td>A</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10574</th>\n",
       "      <td>MO010149</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-16 00:00:00</td>\n",
       "      <td>119751.0</td>\n",
       "      <td>MO010149</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>100000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10575</th>\n",
       "      <td>MO010149</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-16 00:00:00</td>\n",
       "      <td>119751.0</td>\n",
       "      <td>MO010149</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>100000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10576</th>\n",
       "      <td>MO010149</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-11-16 00:00:00</td>\n",
       "      <td>119751.0</td>\n",
       "      <td>MO010149</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>100000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13527</th>\n",
       "      <td>MO007172</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-09-25 00:00:00</td>\n",
       "      <td>116768.0</td>\n",
       "      <td>MO007172</td>\n",
       "      <td>102214.0</td>\n",
       "      <td>B</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14350</th>\n",
       "      <td>MO006358</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-09-11 00:00:00</td>\n",
       "      <td>115954.0</td>\n",
       "      <td>MO006358</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17710</th>\n",
       "      <td>MO002994</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-07-28 00:00:00</td>\n",
       "      <td>112586.0</td>\n",
       "      <td>MO002994</td>\n",
       "      <td>102214.0</td>\n",
       "      <td>B</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20636</th>\n",
       "      <td>MO000028</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109606.0</td>\n",
       "      <td>MO000028</td>\n",
       "      <td>102334.0</td>\n",
       "      <td>C</td>\n",
       "      <td>520000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20637</th>\n",
       "      <td>MO000028</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109606.0</td>\n",
       "      <td>MO000028</td>\n",
       "      <td>102334.0</td>\n",
       "      <td>C</td>\n",
       "      <td>305000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20639</th>\n",
       "      <td>MO000028</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109606.0</td>\n",
       "      <td>MO000028</td>\n",
       "      <td>102334.0</td>\n",
       "      <td>C</td>\n",
       "      <td>216000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20640</th>\n",
       "      <td>MO000028</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109606.0</td>\n",
       "      <td>MO000028</td>\n",
       "      <td>120822.0</td>\n",
       "      <td>C</td>\n",
       "      <td>309000.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20648</th>\n",
       "      <td>MO000027</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109605.0</td>\n",
       "      <td>MO000027</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>8700.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20649</th>\n",
       "      <td>MO000027</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109605.0</td>\n",
       "      <td>MO000027</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>8700.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20650</th>\n",
       "      <td>MO000027</td>\n",
       "      <td>超额领料</td>\n",
       "      <td>2023-06-06 00:00:00</td>\n",
       "      <td>109605.0</td>\n",
       "      <td>MO000027</td>\n",
       "      <td>120827.0</td>\n",
       "      <td>C</td>\n",
       "      <td>8700.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           单据编号 领料状态_x                FDATE       FID   FBILLNO     结案人id  \\\n",
       "859    MO019814   超额领料  2024-04-27 00:00:00  129416.0  MO019814  120836.0   \n",
       "9604   MO011097   超额领料  2023-11-28 00:00:00  120699.0  MO011097  120827.0   \n",
       "10262  MO010464   超额领料  2023-11-20 00:00:00  120066.0  MO010464  120836.0   \n",
       "10263  MO010464   超额领料  2023-11-20 00:00:00  120066.0  MO010464  120836.0   \n",
       "10264  MO010464   超额领料  2023-11-20 00:00:00  120066.0  MO010464  120836.0   \n",
       "10265  MO010464   超额领料  2023-11-20 00:00:00  120066.0  MO010464  120836.0   \n",
       "10266  MO010464   超额领料  2023-11-20 00:00:00  120066.0  MO010464  120836.0   \n",
       "10574  MO010149   超额领料  2023-11-16 00:00:00  119751.0  MO010149  120827.0   \n",
       "10575  MO010149   超额领料  2023-11-16 00:00:00  119751.0  MO010149  120827.0   \n",
       "10576  MO010149   超额领料  2023-11-16 00:00:00  119751.0  MO010149  120827.0   \n",
       "13527  MO007172   超额领料  2023-09-25 00:00:00  116768.0  MO007172  102214.0   \n",
       "14350  MO006358   超额领料  2023-09-11 00:00:00  115954.0  MO006358  120827.0   \n",
       "17710  MO002994   超额领料  2023-07-28 00:00:00  112586.0  MO002994  102214.0   \n",
       "20636  MO000028   超额领料  2023-06-06 00:00:00  109606.0  MO000028  102334.0   \n",
       "20637  MO000028   超额领料  2023-06-06 00:00:00  109606.0  MO000028  102334.0   \n",
       "20639  MO000028   超额领料  2023-06-06 00:00:00  109606.0  MO000028  102334.0   \n",
       "20640  MO000028   超额领料  2023-06-06 00:00:00  109606.0  MO000028  120822.0   \n",
       "20648  MO000027   超额领料  2023-06-06 00:00:00  109605.0  MO000027  120827.0   \n",
       "20649  MO000027   超额领料  2023-06-06 00:00:00  109605.0  MO000027  120827.0   \n",
       "20650  MO000027   超额领料  2023-06-06 00:00:00  109605.0  MO000027  120827.0   \n",
       "\n",
       "      结案类型       领料套数 领料状态_y  \n",
       "859      A      990.0      3  \n",
       "9604     C   100000.0      3  \n",
       "10262    A    20000.0      3  \n",
       "10263    A    20000.0      3  \n",
       "10264    A    20000.0      3  \n",
       "10265    A    20000.0      3  \n",
       "10266    A    20000.0      3  \n",
       "10574    C   100000.0      3  \n",
       "10575    C   100000.0      3  \n",
       "10576    C   100000.0      3  \n",
       "13527    B  1000000.0      3  \n",
       "14350    C    20000.0      3  \n",
       "17710    B     1000.0      3  \n",
       "20636    C   520000.0      3  \n",
       "20637    C   305000.0      3  \n",
       "20639    C   216000.0      3  \n",
       "20640    C   309000.0      3  \n",
       "20648    C     8700.0      3  \n",
       "20649    C     8700.0      3  \n",
       "20650    C     8700.0      3  "
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df业务状态2[(df业务状态2['领料状态_x']=='超额领料')&(df业务状态2['领料状态_y']=='3')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "app=xw.App(visible=True,add_book=False)\n",
    "filepath=r'D:\\下载\\完工入库数量查询_2024051410255720_120820.xlsx'\n",
    "wb=app.books.open(filepath)\n",
    "\n",
    "\n",
    "def 重建一张表(tabName,wb):\n",
    "\n",
    "    if tabName  in  [i.name for i in wb.sheets] :\n",
    "        wb.sheets[ tabName ].delete()\n",
    "    wb.sheets.add( tabName,after = wb.sheets['配置信息'])\n",
    "    return wb.sheets[tabName]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "sheet = wb.sheets['Sheet1']\n",
    "rowNum = sheet.used_range.last_cell.row\n",
    "rankNum = sheet.used_range.last_cell.column\n",
    "data  =  sheet.range('A3').options( expand='table') .value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['来源单据类型',\n",
       " '来源单据编号',\n",
       " '来源单据行号',\n",
       " '业务日期',\n",
       " '产品编码',\n",
       " '产品名称',\n",
       " '成本中心名称',\n",
       " '基本单位',\n",
       " '基本单位数量',\n",
       " '仓库',\n",
       " '批号',\n",
       " '库存状态',\n",
       " '货主']"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame(data[1:],columns=data[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>来源单据编号</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>来源单据类型</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>合计</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>委外入库单</th>\n",
       "      <td>955</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>委外退料单</th>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>生产入库</th>\n",
       "      <td>4622</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>生产退库</th>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        来源单据编号\n",
       "来源单据类型        \n",
       "合计           0\n",
       "委外入库单      955\n",
       "委外退料单       16\n",
       "生产入库      4622\n",
       "生产退库        27"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['来源单据类型','来源单据编号']].groupby(['来源单据类型']).count() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>来源单据类型</th>\n",
       "      <th>来源单据编号</th>\n",
       "      <th>来源单据行号</th>\n",
       "      <th>业务日期</th>\n",
       "      <th>产品编码</th>\n",
       "      <th>产品名称</th>\n",
       "      <th>成本中心名称</th>\n",
       "      <th>基本单位</th>\n",
       "      <th>基本单位数量</th>\n",
       "      <th>仓库</th>\n",
       "      <th>批号</th>\n",
       "      <th>库存状态</th>\n",
       "      <th>货主</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011283</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.07.01.0001</td>\n",
       "      <td>打印翻盖</td>\n",
       "      <td>喷枪车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>14900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>2312-020</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011283</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.07.01.0001</td>\n",
       "      <td>打印翻盖</td>\n",
       "      <td>喷枪车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>14900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>2312-020</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011283</td>\n",
       "      <td>3</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.07.01.0001</td>\n",
       "      <td>打印翻盖</td>\n",
       "      <td>喷枪车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>14900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>2312-020</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011283</td>\n",
       "      <td>4</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.07.01.0001</td>\n",
       "      <td>打印翻盖</td>\n",
       "      <td>喷枪车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>24750.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>2312-020</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  来源单据类型        来源单据编号 来源单据行号      业务日期          产品编码  产品名称 成本中心名称 基本单位  \\\n",
       "0   生产入库  SCRK00011283      1  2024/3/1  5.07.01.0001  打印翻盖   喷枪车间  Pcs   \n",
       "1   生产入库  SCRK00011283      2  2024/3/1  5.07.01.0001  打印翻盖   喷枪车间  Pcs   \n",
       "2   生产入库  SCRK00011283      3  2024/3/1  5.07.01.0001  打印翻盖   喷枪车间  Pcs   \n",
       "3   生产入库  SCRK00011283      4  2024/3/1  5.07.01.0001  打印翻盖   喷枪车间  Pcs   \n",
       "\n",
       "    基本单位数量       仓库        批号 库存状态           货主  \n",
       "0  14900.0  点火枪配件仓库  2312-020   可用  宁波市欧琦烟具有限公司  \n",
       "1  14900.0  点火枪配件仓库  2312-020   可用  宁波市欧琦烟具有限公司  \n",
       "2  14900.0  点火枪配件仓库  2312-020   可用  宁波市欧琦烟具有限公司  \n",
       "3  24750.0  点火枪配件仓库  2312-020   可用  宁波市欧琦烟具有限公司  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scdf.head(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "scdf = df[df['来源单据类型']=='生产入库']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>来源单据编号</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>成本中心名称</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>包装车间</th>\n",
       "      <td>564</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>喷枪车间</th>\n",
       "      <td>219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>普机车间</th>\n",
       "      <td>341</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>气化炉组装车间</th>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>注塑车间</th>\n",
       "      <td>2293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>点火枪车间</th>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>焊充车间</th>\n",
       "      <td>1061</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         来源单据编号\n",
       "成本中心名称         \n",
       "包装车间        564\n",
       "喷枪车间        219\n",
       "普机车间        341\n",
       "气化炉组装车间      50\n",
       "注塑车间       2293\n",
       "点火枪车间        94\n",
       "焊充车间       1061"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scdf[['成本中心名称','来源单据编号']].groupby(['成本中心名称']).count() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>来源单据编号</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>成本中心名称</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>包装车间</th>\n",
       "      <td>387</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>喷枪车间</th>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>普机车间</th>\n",
       "      <td>191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>气化炉组装车间</th>\n",
       "      <td>43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>注塑车间</th>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>点火枪车间</th>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>焊充车间</th>\n",
       "      <td>600</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         来源单据编号\n",
       "成本中心名称         \n",
       "包装车间        387\n",
       "喷枪车间         61\n",
       "普机车间        191\n",
       "气化炉组装车间      43\n",
       "注塑车间        126\n",
       "点火枪车间        27\n",
       "焊充车间        600"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#scdf.groupby(['来源单据编号']).head(1).iloc[:,1:7].groupby(['成本中心名称']).count() \n",
    "    \n",
    "    \n",
    "scdf.groupby(['来源单据编号']).head(1).loc[:,['成本中心名称','来源单据编号']] .groupby(['成本中心名称']).count() \n",
    "     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>来源单据类型</th>\n",
       "      <th>来源单据编号</th>\n",
       "      <th>来源单据行号</th>\n",
       "      <th>业务日期</th>\n",
       "      <th>产品编码</th>\n",
       "      <th>产品名称</th>\n",
       "      <th>成本中心名称</th>\n",
       "      <th>基本单位</th>\n",
       "      <th>基本单位数量</th>\n",
       "      <th>仓库</th>\n",
       "      <th>批号</th>\n",
       "      <th>库存状态</th>\n",
       "      <th>货主</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011296</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>9000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011297</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12200.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011297</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/1</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>5800.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>171</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011345</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/2</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>172</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011346</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/2</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>13500.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>314</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011370</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/3</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>315</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011371</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/3</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>9000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>418</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011400</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/4</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>419</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011401</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/4</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>10009.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>420</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011401</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/4</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>3491.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>523</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011421</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/5</td>\n",
       "      <td>5.06.48.0002</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>9900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>671</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011466</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/6</td>\n",
       "      <td>5.06.48.0002</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>15300.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>678</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011475</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/6</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>6000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>679</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011476</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/6</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>18000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>816</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011523</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/7</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011524</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/7</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>6200.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>818</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011524</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/7</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>5800.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>929</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011548</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/8</td>\n",
       "      <td>5.06.48.0002</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>24900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>981</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011587</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/8</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1146</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011629</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/9</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1147</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011630</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/9</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>13500.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1241</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011645</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/9</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1242</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011646</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/10</td>\n",
       "      <td>5.06.48.0006</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1288</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011675</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/10</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1289</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011676</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/10</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>9000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1421</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011706</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/11</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1422</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011707</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/11</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>9000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1567</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011769</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/12</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>18000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1568</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011770</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/12</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>13500.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1688</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011794</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/13</td>\n",
       "      <td>5.06.48.0019</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>18900.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1689</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011794</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/13</td>\n",
       "      <td>5.06.48.0019</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>36000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1691</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011796</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/13</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1692</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011797</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/13</td>\n",
       "      <td>5.05.06.0002</td>\n",
       "      <td>压堵头</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>10200.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1855</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011840</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/14</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>18000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2078</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011896</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/16</td>\n",
       "      <td>5.06.48.0019</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>3000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2347</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011995</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/17</td>\n",
       "      <td>5.08.01.0001</td>\n",
       "      <td>中架风罩组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>22139.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2348</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00011995</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/17</td>\n",
       "      <td>5.08.01.0001</td>\n",
       "      <td>中架风罩组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2422</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012006</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/17</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2579</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012061</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/19</td>\n",
       "      <td>5.06.48.0020</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>57000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2580</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012061</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/19</td>\n",
       "      <td>5.06.48.0020</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>5400.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2701</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012097</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/20</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>300.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2702</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012097</td>\n",
       "      <td>2</td>\n",
       "      <td>2024/3/20</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>31800.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2949</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012181</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/21</td>\n",
       "      <td>5.06.48.0013</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3512</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012396</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/25</td>\n",
       "      <td>5.06.48.0008</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>16200.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3521</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012400</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/25</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>24000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3852</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012550</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/27</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4281</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012694</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/30</td>\n",
       "      <td>5.06.48.0008</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>23800.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4302</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012710</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/30</td>\n",
       "      <td>5.06.48.0018</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>68100.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4500</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012797</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/31</td>\n",
       "      <td>5.06.48.0011</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4569</th>\n",
       "      <td>生产入库</td>\n",
       "      <td>SCRK00012820</td>\n",
       "      <td>1</td>\n",
       "      <td>2024/3/31</td>\n",
       "      <td>5.06.48.0002</td>\n",
       "      <td>气化炉瓷杯组合</td>\n",
       "      <td>气化炉组装车间</td>\n",
       "      <td>Pcs</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>点火枪配件仓库</td>\n",
       "      <td>None</td>\n",
       "      <td>可用</td>\n",
       "      <td>宁波市欧琦烟具有限公司</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     来源单据类型        来源单据编号 来源单据行号       业务日期          产品编码     产品名称   成本中心名称  \\\n",
       "31     生产入库  SCRK00011296      1   2024/3/1  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "32     生产入库  SCRK00011297      1   2024/3/1  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "33     生产入库  SCRK00011297      2   2024/3/1  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "171    生产入库  SCRK00011345      1   2024/3/2  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "172    生产入库  SCRK00011346      1   2024/3/2  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "314    生产入库  SCRK00011370      1   2024/3/3  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "315    生产入库  SCRK00011371      1   2024/3/3  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "418    生产入库  SCRK00011400      1   2024/3/4  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "419    生产入库  SCRK00011401      1   2024/3/4  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "420    生产入库  SCRK00011401      2   2024/3/4  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "523    生产入库  SCRK00011421      1   2024/3/5  5.06.48.0002  气化炉瓷杯组合  气化炉组装车间   \n",
       "671    生产入库  SCRK00011466      1   2024/3/6  5.06.48.0002  气化炉瓷杯组合  气化炉组装车间   \n",
       "678    生产入库  SCRK00011475      1   2024/3/6  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "679    生产入库  SCRK00011476      1   2024/3/6  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "816    生产入库  SCRK00011523      1   2024/3/7  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "817    生产入库  SCRK00011524      1   2024/3/7  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "818    生产入库  SCRK00011524      2   2024/3/7  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "929    生产入库  SCRK00011548      1   2024/3/8  5.06.48.0002  气化炉瓷杯组合  气化炉组装车间   \n",
       "981    生产入库  SCRK00011587      1   2024/3/8  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1146   生产入库  SCRK00011629      1   2024/3/9  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1147   生产入库  SCRK00011630      1   2024/3/9  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "1241   生产入库  SCRK00011645      1   2024/3/9  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1242   生产入库  SCRK00011646      1  2024/3/10  5.06.48.0006  气化炉瓷杯组合  气化炉组装车间   \n",
       "1288   生产入库  SCRK00011675      1  2024/3/10  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1289   生产入库  SCRK00011676      1  2024/3/10  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "1421   生产入库  SCRK00011706      1  2024/3/11  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1422   生产入库  SCRK00011707      1  2024/3/11  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "1567   生产入库  SCRK00011769      1  2024/3/12  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1568   生产入库  SCRK00011770      1  2024/3/12  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "1688   生产入库  SCRK00011794      1  2024/3/13  5.06.48.0019  气化炉瓷杯组合  气化炉组装车间   \n",
       "1689   生产入库  SCRK00011794      2  2024/3/13  5.06.48.0019  气化炉瓷杯组合  气化炉组装车间   \n",
       "1691   生产入库  SCRK00011796      1  2024/3/13  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "1692   生产入库  SCRK00011797      1  2024/3/13  5.05.06.0002      压堵头  气化炉组装车间   \n",
       "1855   生产入库  SCRK00011840      1  2024/3/14  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "2078   生产入库  SCRK00011896      1  2024/3/16  5.06.48.0019  气化炉瓷杯组合  气化炉组装车间   \n",
       "2347   生产入库  SCRK00011995      1  2024/3/17  5.08.01.0001   中架风罩组合  气化炉组装车间   \n",
       "2348   生产入库  SCRK00011995      2  2024/3/17  5.08.01.0001   中架风罩组合  气化炉组装车间   \n",
       "2422   生产入库  SCRK00012006      1  2024/3/17  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "2579   生产入库  SCRK00012061      1  2024/3/19  5.06.48.0020  气化炉瓷杯组合  气化炉组装车间   \n",
       "2580   生产入库  SCRK00012061      2  2024/3/19  5.06.48.0020  气化炉瓷杯组合  气化炉组装车间   \n",
       "2701   生产入库  SCRK00012097      1  2024/3/20  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "2702   生产入库  SCRK00012097      2  2024/3/20  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "2949   生产入库  SCRK00012181      1  2024/3/21  5.06.48.0013  气化炉瓷杯组合  气化炉组装车间   \n",
       "3512   生产入库  SCRK00012396      1  2024/3/25  5.06.48.0008  气化炉瓷杯组合  气化炉组装车间   \n",
       "3521   生产入库  SCRK00012400      1  2024/3/25  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "3852   生产入库  SCRK00012550      1  2024/3/27  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "4281   生产入库  SCRK00012694      1  2024/3/30  5.06.48.0008  气化炉瓷杯组合  气化炉组装车间   \n",
       "4302   生产入库  SCRK00012710      1  2024/3/30  5.06.48.0018  气化炉瓷杯组合  气化炉组装车间   \n",
       "4500   生产入库  SCRK00012797      1  2024/3/31  5.06.48.0011  气化炉瓷杯组合  气化炉组装车间   \n",
       "4569   生产入库  SCRK00012820      1  2024/3/31  5.06.48.0002  气化炉瓷杯组合  气化炉组装车间   \n",
       "\n",
       "     基本单位   基本单位数量       仓库    批号 库存状态           货主  \n",
       "31    Pcs   9000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "32    Pcs  12200.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "33    Pcs   5800.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "171   Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "172   Pcs  13500.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "314   Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "315   Pcs   9000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "418   Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "419   Pcs  10009.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "420   Pcs   3491.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "523   Pcs   9900.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "671   Pcs  15300.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "678   Pcs   6000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "679   Pcs  18000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "816   Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "817   Pcs   6200.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "818   Pcs   5800.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "929   Pcs  24900.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "981   Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1146  Pcs  10000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1147  Pcs  13500.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1241  Pcs   8000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1242  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1288  Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1289  Pcs   9000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1421  Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1422  Pcs   9000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1567  Pcs  18000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1568  Pcs  13500.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1688  Pcs  18900.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1689  Pcs  36000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1691  Pcs  12000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1692  Pcs  10200.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "1855  Pcs  18000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2078  Pcs   3000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2347  Pcs  22139.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2348  Pcs  20000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2422  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2579  Pcs  57000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2580  Pcs   5400.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2701  Pcs    300.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2702  Pcs  31800.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "2949  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "3512  Pcs  16200.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "3521  Pcs  24000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "3852  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "4281  Pcs  23800.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "4302  Pcs  68100.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "4500  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  \n",
       "4569  Pcs  30000.0  点火枪配件仓库  None   可用  宁波市欧琦烟具有限公司  "
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " scdf[scdf['成本中心名称']=='气化炉组装车间'] "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
